BOOTJSDIR=modules/boot/js
DOC_SRCS=$(BOOTJSDIR)/async.js $(BOOTJSDIR)/history.js $(BOOTJSDIR)/modules.js $(BOOTJSDIR)/routes.js $(BOOTJSDIR)/tiles.js $(BOOTJSDIR)/useragent.js $(BOOTJSDIR)/util.js

# variables for the make module command
moduledir=modules/$(name)
namespace=Hybrid # default namespace

dev:
	python build.py --development

dist:
	python build.py

serve:
	python build.py --development --serve --watch
	
serve_vm:
	python build.py --development --watch --serve --vm --tmp-build-dir=${BUILDDIR}

module:
	@bash makemodule.sh $(moduledir) $(namespace)

reference_docs:
	java -jar other/jsdoc-toolkit/jsrun.jar other/jsdoc-toolkit/app/run.js -t=other/jsdoc-toolkit/templates/jsdoc -d=docs/html $(DOC_SRCS)

confluence_docs:
	java -jar other/jsdoc-toolkit/jsrun.jar other/jsdoc-toolkit/app/run.js -t=other/jsdoc-toolkit/templates/confluence -d=docs/confluence $(DOC_SRCS)

google_code_docs:
	java -jar other/jsdoc-toolkit/jsrun.jar other/jsdoc-toolkit/app/run.js -t=other/jsdoc-toolkit/templates/googlecode -d=docs/googlecode $(DOC_SRCS)

clean:
	-find . -name *.pyc -exec rm -rf {} \;
	-find . -name *.so -exec rm -rf {} \;
	-find . -name *.dep -exec rm -rf {} \;
	-find . -name "*~" -exec rm -rf {} \;
	-find . -name scss -exec rm -rf {} \;
	-find . -name ".sass-cache" -exec rm -rf {} \;
	-find . -name sprites.png -exec rm -rf {} \;
	rm -rf build 
	rm -rf build.tmp
